#ifndef APPLYFRIENDPAGE_H
#define APPLYFRIENDPAGE_H

#include "applyfrienditem.h"

#include <QWidget>
#include <QJsonArray>
#include <unordered_map>

namespace Ui {
class ApplyFriendPage;
}

// 好友申请界面类
class ApplyFriendPage : public QWidget
{
    Q_OBJECT

public:
    explicit ApplyFriendPage(QWidget *parent = nullptr);
    ~ApplyFriendPage();

    void addNewApply(std::shared_ptr<AddFriendApply> apply);

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    void loadApplyList();

public slots:
    void slot_auth_rsp(std::shared_ptr<AuthRsp> auth_rsp);


signals:
    void sig_show_search(bool);


private:
    Ui::ApplyFriendPage *ui;
    std::unordered_map<int, ApplyFriendItem*> m_unauth_items;
};

#endif // APPLYFRIENDPAGE_H
